<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="language" content="en" />
        <link href="./assets/ffd55088/css/bootstrap.css" rel="stylesheet">
<link href="./assets/5cf9384a/solarized_light.css" rel="stylesheet">
<link href="./assets/6c54116e/style.css" rel="stylesheet">
<script src="./assets/a44cef0f/jquery.js"></script>
<script src="./assets/ffd55088/js/bootstrap.js"></script>
<script src="./assets/8ac4e28a/jssearch.js"></script>    <title>BaseArrayHelper, yii\helpers\BaseArrayHelper - Yii Framework 2.0 API Documentation</title>
</head>
<body>

<div class="wrap">
    <nav id="w7069" class="navbar-inverse navbar-fixed-top navbar" role="navigation"><div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w7069-collapse"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span></button><a class="navbar-brand" href="./index.html">Yii Framework 2.0 API Documentation</a></div><div id="w7069-collapse" class="collapse navbar-collapse"><ul id="w7070" class="navbar-nav nav"><li><a href="./index.html">Class reference</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Extensions <b class="caret"></b></a><ul id="w7071" class="dropdown-menu"><li><a href="./ext-apidoc-index.html" tabindex="-1">apidoc</a></li>
<li><a href="./ext-authclient-index.html" tabindex="-1">authclient</a></li>
<li><a href="./ext-bootstrap-index.html" tabindex="-1">bootstrap</a></li>
<li><a href="./ext-codeception-index.html" tabindex="-1">codeception</a></li>
<li><a href="./ext-debug-index.html" tabindex="-1">debug</a></li>
<li><a href="./ext-elasticsearch-index.html" tabindex="-1">elasticsearch</a></li>
<li><a href="./ext-faker-index.html" tabindex="-1">faker</a></li>
<li><a href="./ext-gii-index.html" tabindex="-1">gii</a></li>
<li><a href="./ext-imagine-index.html" tabindex="-1">imagine</a></li>
<li><a href="./ext-jui-index.html" tabindex="-1">jui</a></li>
<li><a href="./ext-mongodb-index.html" tabindex="-1">mongodb</a></li>
<li><a href="./ext-redis-index.html" tabindex="-1">redis</a></li>
<li><a href="./ext-smarty-index.html" tabindex="-1">smarty</a></li>
<li><a href="./ext-sphinx-index.html" tabindex="-1">sphinx</a></li>
<li><a href="./ext-swiftmailer-index.html" tabindex="-1">swiftmailer</a></li>
<li><a href="./ext-twig-index.html" tabindex="-1">twig</a></li></ul></li>
<li><a href="./guide-README.html">Guide</a></li></ul><div class="navbar-form navbar-left" role="search">
  <div class="form-group">
    <input id="searchbox" type="text" class="form-control" placeholder="Search">
  </div>
</div>
</div></nav>
    <div id="search-resultbox" style="display: none;" class="modal-content">
        <ul id="search-results">
        </ul>
    </div>

    
<div class="row">
    <div class="col-md-3">
                <div id="navigation" class="list-group"><a class="list-group-item" href="#navigation-7038" data-toggle="collapse" data-parent="#navigation">Not namespaced classes <b class="caret"></b></a><div id="navigation-7038" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii.html">Yii</a></div>
<a class="list-group-item" href="#navigation-7039" data-toggle="collapse" data-parent="#navigation">yii <b class="caret"></b></a><div id="navigation-7039" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-baseyii.html">BaseYii</a></div>
<a class="list-group-item" href="#navigation-7040" data-toggle="collapse" data-parent="#navigation">yii\base <b class="caret"></b></a><div id="navigation-7040" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-base-action.html">Action</a>
<a class="list-group-item" href="./yii-base-actionevent.html">ActionEvent</a>
<a class="list-group-item" href="./yii-base-actionfilter.html">ActionFilter</a>
<a class="list-group-item" href="./yii-base-application.html">Application</a>
<a class="list-group-item" href="./yii-base-arrayaccesstrait.html">ArrayAccessTrait</a>
<a class="list-group-item" href="./yii-base-arrayable.html">Arrayable</a>
<a class="list-group-item" href="./yii-base-arrayabletrait.html">ArrayableTrait</a>
<a class="list-group-item" href="./yii-base-behavior.html">Behavior</a>
<a class="list-group-item" href="./yii-base-bootstrapinterface.html">BootstrapInterface</a>
<a class="list-group-item" href="./yii-base-component.html">Component</a>
<a class="list-group-item" href="./yii-base-configurable.html">Configurable</a>
<a class="list-group-item" href="./yii-base-controller.html">Controller</a>
<a class="list-group-item" href="./yii-base-dynamicmodel.html">DynamicModel</a>
<a class="list-group-item" href="./yii-base-errorexception.html">ErrorException</a>
<a class="list-group-item" href="./yii-base-errorhandler.html">ErrorHandler</a>
<a class="list-group-item" href="./yii-base-event.html">Event</a>
<a class="list-group-item" href="./yii-base-exception.html">Exception</a>
<a class="list-group-item" href="./yii-base-exitexception.html">ExitException</a>
<a class="list-group-item" href="./yii-base-inlineaction.html">InlineAction</a>
<a class="list-group-item" href="./yii-base-invalidcallexception.html">InvalidCallException</a>
<a class="list-group-item" href="./yii-base-invalidconfigexception.html">InvalidConfigException</a>
<a class="list-group-item" href="./yii-base-invalidparamexception.html">InvalidParamException</a>
<a class="list-group-item" href="./yii-base-invalidrouteexception.html">InvalidRouteException</a>
<a class="list-group-item" href="./yii-base-invalidvalueexception.html">InvalidValueException</a>
<a class="list-group-item" href="./yii-base-model.html">Model</a>
<a class="list-group-item" href="./yii-base-modelevent.html">ModelEvent</a>
<a class="list-group-item" href="./yii-base-module.html">Module</a>
<a class="list-group-item" href="./yii-base-notsupportedexception.html">NotSupportedException</a>
<a class="list-group-item" href="./yii-base-object.html">Object</a>
<a class="list-group-item" href="./yii-base-request.html">Request</a>
<a class="list-group-item" href="./yii-base-response.html">Response</a>
<a class="list-group-item" href="./yii-base-security.html">Security</a>
<a class="list-group-item" href="./yii-base-theme.html">Theme</a>
<a class="list-group-item" href="./yii-base-unknownclassexception.html">UnknownClassException</a>
<a class="list-group-item" href="./yii-base-unknownmethodexception.html">UnknownMethodException</a>
<a class="list-group-item" href="./yii-base-unknownpropertyexception.html">UnknownPropertyException</a>
<a class="list-group-item" href="./yii-base-userexception.html">UserException</a>
<a class="list-group-item" href="./yii-base-view.html">View</a>
<a class="list-group-item" href="./yii-base-viewcontextinterface.html">ViewContextInterface</a>
<a class="list-group-item" href="./yii-base-viewevent.html">ViewEvent</a>
<a class="list-group-item" href="./yii-base-viewrenderer.html">ViewRenderer</a>
<a class="list-group-item" href="./yii-base-widget.html">Widget</a></div>
<a class="list-group-item" href="#navigation-7041" data-toggle="collapse" data-parent="#navigation">yii\behaviors <b class="caret"></b></a><div id="navigation-7041" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-behaviors-attributebehavior.html">AttributeBehavior</a>
<a class="list-group-item" href="./yii-behaviors-blameablebehavior.html">BlameableBehavior</a>
<a class="list-group-item" href="./yii-behaviors-sluggablebehavior.html">SluggableBehavior</a>
<a class="list-group-item" href="./yii-behaviors-timestampbehavior.html">TimestampBehavior</a></div>
<a class="list-group-item" href="#navigation-7042" data-toggle="collapse" data-parent="#navigation">yii\caching <b class="caret"></b></a><div id="navigation-7042" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-caching-apccache.html">ApcCache</a>
<a class="list-group-item" href="./yii-caching-arraycache.html">ArrayCache</a>
<a class="list-group-item" href="./yii-caching-cache.html">Cache</a>
<a class="list-group-item" href="./yii-caching-chaineddependency.html">ChainedDependency</a>
<a class="list-group-item" href="./yii-caching-dbcache.html">DbCache</a>
<a class="list-group-item" href="./yii-caching-dbdependency.html">DbDependency</a>
<a class="list-group-item" href="./yii-caching-dependency.html">Dependency</a>
<a class="list-group-item" href="./yii-caching-dummycache.html">DummyCache</a>
<a class="list-group-item" href="./yii-caching-expressiondependency.html">ExpressionDependency</a>
<a class="list-group-item" href="./yii-caching-filecache.html">FileCache</a>
<a class="list-group-item" href="./yii-caching-filedependency.html">FileDependency</a>
<a class="list-group-item" href="./yii-caching-memcache.html">MemCache</a>
<a class="list-group-item" href="./yii-caching-memcacheserver.html">MemCacheServer</a>
<a class="list-group-item" href="./yii-caching-tagdependency.html">TagDependency</a>
<a class="list-group-item" href="./yii-caching-wincache.html">WinCache</a>
<a class="list-group-item" href="./yii-caching-xcache.html">XCache</a>
<a class="list-group-item" href="./yii-caching-zenddatacache.html">ZendDataCache</a></div>
<a class="list-group-item" href="#navigation-7043" data-toggle="collapse" data-parent="#navigation">yii\captcha <b class="caret"></b></a><div id="navigation-7043" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-captcha-captcha.html">Captcha</a>
<a class="list-group-item" href="./yii-captcha-captchaaction.html">CaptchaAction</a>
<a class="list-group-item" href="./yii-captcha-captchaasset.html">CaptchaAsset</a>
<a class="list-group-item" href="./yii-captcha-captchavalidator.html">CaptchaValidator</a></div>
<a class="list-group-item" href="#navigation-7044" data-toggle="collapse" data-parent="#navigation">yii\console <b class="caret"></b></a><div id="navigation-7044" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-console-application.html">Application</a>
<a class="list-group-item" href="./yii-console-controller.html">Controller</a>
<a class="list-group-item" href="./yii-console-errorhandler.html">ErrorHandler</a>
<a class="list-group-item" href="./yii-console-exception.html">Exception</a>
<a class="list-group-item" href="./yii-console-markdown.html">Markdown</a>
<a class="list-group-item" href="./yii-console-request.html">Request</a>
<a class="list-group-item" href="./yii-console-response.html">Response</a></div>
<a class="list-group-item" href="#navigation-7045" data-toggle="collapse" data-parent="#navigation">yii\console\controllers <b class="caret"></b></a><div id="navigation-7045" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-console-controllers-assetcontroller.html">AssetController</a>
<a class="list-group-item" href="./yii-console-controllers-basemigratecontroller.html">BaseMigrateController</a>
<a class="list-group-item" href="./yii-console-controllers-cachecontroller.html">CacheController</a>
<a class="list-group-item" href="./yii-console-controllers-fixturecontroller.html">FixtureController</a>
<a class="list-group-item" href="./yii-console-controllers-helpcontroller.html">HelpController</a>
<a class="list-group-item" href="./yii-console-controllers-messagecontroller.html">MessageController</a>
<a class="list-group-item" href="./yii-console-controllers-migratecontroller.html">MigrateController</a>
<a class="list-group-item" href="./yii-console-controllers-servecontroller.html">ServeController</a></div>
<a class="list-group-item" href="#navigation-7046" data-toggle="collapse" data-parent="#navigation">yii\data <b class="caret"></b></a><div id="navigation-7046" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-data-activedataprovider.html">ActiveDataProvider</a>
<a class="list-group-item" href="./yii-data-arraydataprovider.html">ArrayDataProvider</a>
<a class="list-group-item" href="./yii-data-basedataprovider.html">BaseDataProvider</a>
<a class="list-group-item" href="./yii-data-dataproviderinterface.html">DataProviderInterface</a>
<a class="list-group-item" href="./yii-data-pagination.html">Pagination</a>
<a class="list-group-item" href="./yii-data-sort.html">Sort</a>
<a class="list-group-item" href="./yii-data-sqldataprovider.html">SqlDataProvider</a></div>
<a class="list-group-item" href="#navigation-7047" data-toggle="collapse" data-parent="#navigation">yii\db <b class="caret"></b></a><div id="navigation-7047" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-activequery.html">ActiveQuery</a>
<a class="list-group-item" href="./yii-db-activequeryinterface.html">ActiveQueryInterface</a>
<a class="list-group-item" href="./yii-db-activequerytrait.html">ActiveQueryTrait</a>
<a class="list-group-item" href="./yii-db-activerecord.html">ActiveRecord</a>
<a class="list-group-item" href="./yii-db-activerecordinterface.html">ActiveRecordInterface</a>
<a class="list-group-item" href="./yii-db-activerelationtrait.html">ActiveRelationTrait</a>
<a class="list-group-item" href="./yii-db-aftersaveevent.html">AfterSaveEvent</a>
<a class="list-group-item" href="./yii-db-baseactiverecord.html">BaseActiveRecord</a>
<a class="list-group-item" href="./yii-db-batchqueryresult.html">BatchQueryResult</a>
<a class="list-group-item" href="./yii-db-columnschema.html">ColumnSchema</a>
<a class="list-group-item" href="./yii-db-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-command.html">Command</a>
<a class="list-group-item" href="./yii-db-connection.html">Connection</a>
<a class="list-group-item" href="./yii-db-datareader.html">DataReader</a>
<a class="list-group-item" href="./yii-db-exception.html">Exception</a>
<a class="list-group-item" href="./yii-db-expression.html">Expression</a>
<a class="list-group-item" href="./yii-db-integrityexception.html">IntegrityException</a>
<a class="list-group-item" href="./yii-db-migration.html">Migration</a>
<a class="list-group-item" href="./yii-db-migrationinterface.html">MigrationInterface</a>
<a class="list-group-item" href="./yii-db-query.html">Query</a>
<a class="list-group-item" href="./yii-db-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-queryinterface.html">QueryInterface</a>
<a class="list-group-item" href="./yii-db-querytrait.html">QueryTrait</a>
<a class="list-group-item" href="./yii-db-schema.html">Schema</a>
<a class="list-group-item" href="./yii-db-schemabuildertrait.html">SchemaBuilderTrait</a>
<a class="list-group-item" href="./yii-db-staleobjectexception.html">StaleObjectException</a>
<a class="list-group-item" href="./yii-db-tableschema.html">TableSchema</a>
<a class="list-group-item" href="./yii-db-transaction.html">Transaction</a></div>
<a class="list-group-item" href="#navigation-7048" data-toggle="collapse" data-parent="#navigation">yii\db\cubrid <b class="caret"></b></a><div id="navigation-7048" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-cubrid-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-cubrid-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-cubrid-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-7049" data-toggle="collapse" data-parent="#navigation">yii\db\mssql <b class="caret"></b></a><div id="navigation-7049" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-mssql-pdo.html">PDO</a>
<a class="list-group-item" href="./yii-db-mssql-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-mssql-schema.html">Schema</a>
<a class="list-group-item" href="./yii-db-mssql-sqlsrvpdo.html">SqlsrvPDO</a>
<a class="list-group-item" href="./yii-db-mssql-tableschema.html">TableSchema</a></div>
<a class="list-group-item" href="#navigation-7050" data-toggle="collapse" data-parent="#navigation">yii\db\mysql <b class="caret"></b></a><div id="navigation-7050" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-mysql-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-mysql-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-mysql-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-7051" data-toggle="collapse" data-parent="#navigation">yii\db\oci <b class="caret"></b></a><div id="navigation-7051" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-oci-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-oci-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-oci-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-7052" data-toggle="collapse" data-parent="#navigation">yii\db\pgsql <b class="caret"></b></a><div id="navigation-7052" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-pgsql-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-pgsql-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-7053" data-toggle="collapse" data-parent="#navigation">yii\db\sqlite <b class="caret"></b></a><div id="navigation-7053" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-db-sqlite-columnschemabuilder.html">ColumnSchemaBuilder</a>
<a class="list-group-item" href="./yii-db-sqlite-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-db-sqlite-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-7054" data-toggle="collapse" data-parent="#navigation">yii\di <b class="caret"></b></a><div id="navigation-7054" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-di-container.html">Container</a>
<a class="list-group-item" href="./yii-di-instance.html">Instance</a>
<a class="list-group-item" href="./yii-di-notinstantiableexception.html">NotInstantiableException</a>
<a class="list-group-item" href="./yii-di-servicelocator.html">ServiceLocator</a></div>
<a class="list-group-item" href="#navigation-7055" data-toggle="collapse" data-parent="#navigation">yii\filters <b class="caret"></b></a><div id="navigation-7055" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-filters-accesscontrol.html">AccessControl</a>
<a class="list-group-item" href="./yii-filters-accessrule.html">AccessRule</a>
<a class="list-group-item" href="./yii-filters-contentnegotiator.html">ContentNegotiator</a>
<a class="list-group-item" href="./yii-filters-cors.html">Cors</a>
<a class="list-group-item" href="./yii-filters-httpcache.html">HttpCache</a>
<a class="list-group-item" href="./yii-filters-pagecache.html">PageCache</a>
<a class="list-group-item" href="./yii-filters-ratelimitinterface.html">RateLimitInterface</a>
<a class="list-group-item" href="./yii-filters-ratelimiter.html">RateLimiter</a>
<a class="list-group-item" href="./yii-filters-verbfilter.html">VerbFilter</a></div>
<a class="list-group-item" href="#navigation-7056" data-toggle="collapse" data-parent="#navigation">yii\filters\auth <b class="caret"></b></a><div id="navigation-7056" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-filters-auth-authinterface.html">AuthInterface</a>
<a class="list-group-item" href="./yii-filters-auth-authmethod.html">AuthMethod</a>
<a class="list-group-item" href="./yii-filters-auth-compositeauth.html">CompositeAuth</a>
<a class="list-group-item" href="./yii-filters-auth-httpbasicauth.html">HttpBasicAuth</a>
<a class="list-group-item" href="./yii-filters-auth-httpbearerauth.html">HttpBearerAuth</a>
<a class="list-group-item" href="./yii-filters-auth-queryparamauth.html">QueryParamAuth</a></div>
<a class="list-group-item" href="#navigation-7057" data-toggle="collapse" data-parent="#navigation">yii\grid <b class="caret"></b></a><div id="navigation-7057" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-grid-actioncolumn.html">ActionColumn</a>
<a class="list-group-item" href="./yii-grid-checkboxcolumn.html">CheckboxColumn</a>
<a class="list-group-item" href="./yii-grid-column.html">Column</a>
<a class="list-group-item" href="./yii-grid-datacolumn.html">DataColumn</a>
<a class="list-group-item" href="./yii-grid-gridview.html">GridView</a>
<a class="list-group-item" href="./yii-grid-gridviewasset.html">GridViewAsset</a>
<a class="list-group-item" href="./yii-grid-serialcolumn.html">SerialColumn</a></div>
<a class="list-group-item active" href="#navigation-7058" data-toggle="collapse" data-parent="#navigation">yii\helpers <b class="caret"></b></a><div id="navigation-7058" class="submenu panel-collapse collapse in"><a class="list-group-item" href="./yii-helpers-arrayhelper.html">ArrayHelper</a>
<a class="list-group-item active" href="./yii-helpers-basearrayhelper.html">BaseArrayHelper</a>
<a class="list-group-item" href="./yii-helpers-baseconsole.html">BaseConsole</a>
<a class="list-group-item" href="./yii-helpers-basefilehelper.html">BaseFileHelper</a>
<a class="list-group-item" href="./yii-helpers-baseformatconverter.html">BaseFormatConverter</a>
<a class="list-group-item" href="./yii-helpers-basehtml.html">BaseHtml</a>
<a class="list-group-item" href="./yii-helpers-basehtmlpurifier.html">BaseHtmlPurifier</a>
<a class="list-group-item" href="./yii-helpers-baseinflector.html">BaseInflector</a>
<a class="list-group-item" href="./yii-helpers-basejson.html">BaseJson</a>
<a class="list-group-item" href="./yii-helpers-basemarkdown.html">BaseMarkdown</a>
<a class="list-group-item" href="./yii-helpers-basestringhelper.html">BaseStringHelper</a>
<a class="list-group-item" href="./yii-helpers-baseurl.html">BaseUrl</a>
<a class="list-group-item" href="./yii-helpers-basevardumper.html">BaseVarDumper</a>
<a class="list-group-item" href="./yii-helpers-console.html">Console</a>
<a class="list-group-item" href="./yii-helpers-filehelper.html">FileHelper</a>
<a class="list-group-item" href="./yii-helpers-formatconverter.html">FormatConverter</a>
<a class="list-group-item" href="./yii-helpers-html.html">Html</a>
<a class="list-group-item" href="./yii-helpers-htmlpurifier.html">HtmlPurifier</a>
<a class="list-group-item" href="./yii-helpers-inflector.html">Inflector</a>
<a class="list-group-item" href="./yii-helpers-json.html">Json</a>
<a class="list-group-item" href="./yii-helpers-markdown.html">Markdown</a>
<a class="list-group-item" href="./yii-helpers-stringhelper.html">StringHelper</a>
<a class="list-group-item" href="./yii-helpers-url.html">Url</a>
<a class="list-group-item" href="./yii-helpers-vardumper.html">VarDumper</a></div>
<a class="list-group-item" href="#navigation-7059" data-toggle="collapse" data-parent="#navigation">yii\i18n <b class="caret"></b></a><div id="navigation-7059" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-i18n-dbmessagesource.html">DbMessageSource</a>
<a class="list-group-item" href="./yii-i18n-formatter.html">Formatter</a>
<a class="list-group-item" href="./yii-i18n-gettextfile.html">GettextFile</a>
<a class="list-group-item" href="./yii-i18n-gettextmessagesource.html">GettextMessageSource</a>
<a class="list-group-item" href="./yii-i18n-gettextmofile.html">GettextMoFile</a>
<a class="list-group-item" href="./yii-i18n-gettextpofile.html">GettextPoFile</a>
<a class="list-group-item" href="./yii-i18n-i18n.html">I18N</a>
<a class="list-group-item" href="./yii-i18n-messageformatter.html">MessageFormatter</a>
<a class="list-group-item" href="./yii-i18n-messagesource.html">MessageSource</a>
<a class="list-group-item" href="./yii-i18n-missingtranslationevent.html">MissingTranslationEvent</a>
<a class="list-group-item" href="./yii-i18n-phpmessagesource.html">PhpMessageSource</a></div>
<a class="list-group-item" href="#navigation-7060" data-toggle="collapse" data-parent="#navigation">yii\log <b class="caret"></b></a><div id="navigation-7060" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-log-dbtarget.html">DbTarget</a>
<a class="list-group-item" href="./yii-log-dispatcher.html">Dispatcher</a>
<a class="list-group-item" href="./yii-log-emailtarget.html">EmailTarget</a>
<a class="list-group-item" href="./yii-log-filetarget.html">FileTarget</a>
<a class="list-group-item" href="./yii-log-logger.html">Logger</a>
<a class="list-group-item" href="./yii-log-syslogtarget.html">SyslogTarget</a>
<a class="list-group-item" href="./yii-log-target.html">Target</a></div>
<a class="list-group-item" href="#navigation-7061" data-toggle="collapse" data-parent="#navigation">yii\mail <b class="caret"></b></a><div id="navigation-7061" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-mail-basemailer.html">BaseMailer</a>
<a class="list-group-item" href="./yii-mail-basemessage.html">BaseMessage</a>
<a class="list-group-item" href="./yii-mail-mailevent.html">MailEvent</a>
<a class="list-group-item" href="./yii-mail-mailerinterface.html">MailerInterface</a>
<a class="list-group-item" href="./yii-mail-messageinterface.html">MessageInterface</a></div>
<a class="list-group-item" href="#navigation-7062" data-toggle="collapse" data-parent="#navigation">yii\mutex <b class="caret"></b></a><div id="navigation-7062" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-mutex-dbmutex.html">DbMutex</a>
<a class="list-group-item" href="./yii-mutex-filemutex.html">FileMutex</a>
<a class="list-group-item" href="./yii-mutex-mutex.html">Mutex</a>
<a class="list-group-item" href="./yii-mutex-mysqlmutex.html">MysqlMutex</a>
<a class="list-group-item" href="./yii-mutex-pgsqlmutex.html">PgsqlMutex</a></div>
<a class="list-group-item" href="#navigation-7063" data-toggle="collapse" data-parent="#navigation">yii\rbac <b class="caret"></b></a><div id="navigation-7063" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-rbac-assignment.html">Assignment</a>
<a class="list-group-item" href="./yii-rbac-basemanager.html">BaseManager</a>
<a class="list-group-item" href="./yii-rbac-checkaccessinterface.html">CheckAccessInterface</a>
<a class="list-group-item" href="./yii-rbac-dbmanager.html">DbManager</a>
<a class="list-group-item" href="./yii-rbac-item.html">Item</a>
<a class="list-group-item" href="./yii-rbac-managerinterface.html">ManagerInterface</a>
<a class="list-group-item" href="./yii-rbac-permission.html">Permission</a>
<a class="list-group-item" href="./yii-rbac-phpmanager.html">PhpManager</a>
<a class="list-group-item" href="./yii-rbac-role.html">Role</a>
<a class="list-group-item" href="./yii-rbac-rule.html">Rule</a></div>
<a class="list-group-item" href="#navigation-7064" data-toggle="collapse" data-parent="#navigation">yii\rest <b class="caret"></b></a><div id="navigation-7064" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-rest-action.html">Action</a>
<a class="list-group-item" href="./yii-rest-activecontroller.html">ActiveController</a>
<a class="list-group-item" href="./yii-rest-controller.html">Controller</a>
<a class="list-group-item" href="./yii-rest-createaction.html">CreateAction</a>
<a class="list-group-item" href="./yii-rest-deleteaction.html">DeleteAction</a>
<a class="list-group-item" href="./yii-rest-indexaction.html">IndexAction</a>
<a class="list-group-item" href="./yii-rest-optionsaction.html">OptionsAction</a>
<a class="list-group-item" href="./yii-rest-serializer.html">Serializer</a>
<a class="list-group-item" href="./yii-rest-updateaction.html">UpdateAction</a>
<a class="list-group-item" href="./yii-rest-urlrule.html">UrlRule</a>
<a class="list-group-item" href="./yii-rest-viewaction.html">ViewAction</a></div>
<a class="list-group-item" href="#navigation-7065" data-toggle="collapse" data-parent="#navigation">yii\test <b class="caret"></b></a><div id="navigation-7065" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-test-activefixture.html">ActiveFixture</a>
<a class="list-group-item" href="./yii-test-arrayfixture.html">ArrayFixture</a>
<a class="list-group-item" href="./yii-test-baseactivefixture.html">BaseActiveFixture</a>
<a class="list-group-item" href="./yii-test-dbfixture.html">DbFixture</a>
<a class="list-group-item" href="./yii-test-fixture.html">Fixture</a>
<a class="list-group-item" href="./yii-test-fixturetrait.html">FixtureTrait</a>
<a class="list-group-item" href="./yii-test-initdbfixture.html">InitDbFixture</a></div>
<a class="list-group-item" href="#navigation-7066" data-toggle="collapse" data-parent="#navigation">yii\validators <b class="caret"></b></a><div id="navigation-7066" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-validators-booleanvalidator.html">BooleanValidator</a>
<a class="list-group-item" href="./yii-validators-comparevalidator.html">CompareValidator</a>
<a class="list-group-item" href="./yii-validators-datevalidator.html">DateValidator</a>
<a class="list-group-item" href="./yii-validators-defaultvaluevalidator.html">DefaultValueValidator</a>
<a class="list-group-item" href="./yii-validators-eachvalidator.html">EachValidator</a>
<a class="list-group-item" href="./yii-validators-emailvalidator.html">EmailValidator</a>
<a class="list-group-item" href="./yii-validators-existvalidator.html">ExistValidator</a>
<a class="list-group-item" href="./yii-validators-filevalidator.html">FileValidator</a>
<a class="list-group-item" href="./yii-validators-filtervalidator.html">FilterValidator</a>
<a class="list-group-item" href="./yii-validators-imagevalidator.html">ImageValidator</a>
<a class="list-group-item" href="./yii-validators-inlinevalidator.html">InlineValidator</a>
<a class="list-group-item" href="./yii-validators-ipvalidator.html">IpValidator</a>
<a class="list-group-item" href="./yii-validators-numbervalidator.html">NumberValidator</a>
<a class="list-group-item" href="./yii-validators-punycodeasset.html">PunycodeAsset</a>
<a class="list-group-item" href="./yii-validators-rangevalidator.html">RangeValidator</a>
<a class="list-group-item" href="./yii-validators-regularexpressionvalidator.html">RegularExpressionValidator</a>
<a class="list-group-item" href="./yii-validators-requiredvalidator.html">RequiredValidator</a>
<a class="list-group-item" href="./yii-validators-safevalidator.html">SafeValidator</a>
<a class="list-group-item" href="./yii-validators-stringvalidator.html">StringValidator</a>
<a class="list-group-item" href="./yii-validators-uniquevalidator.html">UniqueValidator</a>
<a class="list-group-item" href="./yii-validators-urlvalidator.html">UrlValidator</a>
<a class="list-group-item" href="./yii-validators-validationasset.html">ValidationAsset</a>
<a class="list-group-item" href="./yii-validators-validator.html">Validator</a></div>
<a class="list-group-item" href="#navigation-7067" data-toggle="collapse" data-parent="#navigation">yii\web <b class="caret"></b></a><div id="navigation-7067" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-web-application.html">Application</a>
<a class="list-group-item" href="./yii-web-assetbundle.html">AssetBundle</a>
<a class="list-group-item" href="./yii-web-assetconverter.html">AssetConverter</a>
<a class="list-group-item" href="./yii-web-assetconverterinterface.html">AssetConverterInterface</a>
<a class="list-group-item" href="./yii-web-assetmanager.html">AssetManager</a>
<a class="list-group-item" href="./yii-web-badrequesthttpexception.html">BadRequestHttpException</a>
<a class="list-group-item" href="./yii-web-cachesession.html">CacheSession</a>
<a class="list-group-item" href="./yii-web-compositeurlrule.html">CompositeUrlRule</a>
<a class="list-group-item" href="./yii-web-conflicthttpexception.html">ConflictHttpException</a>
<a class="list-group-item" href="./yii-web-controller.html">Controller</a>
<a class="list-group-item" href="./yii-web-cookie.html">Cookie</a>
<a class="list-group-item" href="./yii-web-cookiecollection.html">CookieCollection</a>
<a class="list-group-item" href="./yii-web-dbsession.html">DbSession</a>
<a class="list-group-item" href="./yii-web-erroraction.html">ErrorAction</a>
<a class="list-group-item" href="./yii-web-errorhandler.html">ErrorHandler</a>
<a class="list-group-item" href="./yii-web-forbiddenhttpexception.html">ForbiddenHttpException</a>
<a class="list-group-item" href="./yii-web-gonehttpexception.html">GoneHttpException</a>
<a class="list-group-item" href="./yii-web-groupurlrule.html">GroupUrlRule</a>
<a class="list-group-item" href="./yii-web-headercollection.html">HeaderCollection</a>
<a class="list-group-item" href="./yii-web-htmlresponseformatter.html">HtmlResponseFormatter</a>
<a class="list-group-item" href="./yii-web-httpexception.html">HttpException</a>
<a class="list-group-item" href="./yii-web-identityinterface.html">IdentityInterface</a>
<a class="list-group-item" href="./yii-web-jqueryasset.html">JqueryAsset</a>
<a class="list-group-item" href="./yii-web-jsexpression.html">JsExpression</a>
<a class="list-group-item" href="./yii-web-jsonparser.html">JsonParser</a>
<a class="list-group-item" href="./yii-web-jsonresponseformatter.html">JsonResponseFormatter</a>
<a class="list-group-item" href="./yii-web-link.html">Link</a>
<a class="list-group-item" href="./yii-web-linkable.html">Linkable</a>
<a class="list-group-item" href="./yii-web-methodnotallowedhttpexception.html">MethodNotAllowedHttpException</a>
<a class="list-group-item" href="./yii-web-multifieldsession.html">MultiFieldSession</a>
<a class="list-group-item" href="./yii-web-notacceptablehttpexception.html">NotAcceptableHttpException</a>
<a class="list-group-item" href="./yii-web-notfoundhttpexception.html">NotFoundHttpException</a>
<a class="list-group-item" href="./yii-web-request.html">Request</a>
<a class="list-group-item" href="./yii-web-requestparserinterface.html">RequestParserInterface</a>
<a class="list-group-item" href="./yii-web-response.html">Response</a>
<a class="list-group-item" href="./yii-web-responseformatterinterface.html">ResponseFormatterInterface</a>
<a class="list-group-item" href="./yii-web-servererrorhttpexception.html">ServerErrorHttpException</a>
<a class="list-group-item" href="./yii-web-session.html">Session</a>
<a class="list-group-item" href="./yii-web-sessioniterator.html">SessionIterator</a>
<a class="list-group-item" href="./yii-web-toomanyrequestshttpexception.html">TooManyRequestsHttpException</a>
<a class="list-group-item" href="./yii-web-unauthorizedhttpexception.html">UnauthorizedHttpException</a>
<a class="list-group-item" href="./yii-web-unprocessableentityhttpexception.html">UnprocessableEntityHttpException</a>
<a class="list-group-item" href="./yii-web-unsupportedmediatypehttpexception.html">UnsupportedMediaTypeHttpException</a>
<a class="list-group-item" href="./yii-web-uploadedfile.html">UploadedFile</a>
<a class="list-group-item" href="./yii-web-urlmanager.html">UrlManager</a>
<a class="list-group-item" href="./yii-web-urlrule.html">UrlRule</a>
<a class="list-group-item" href="./yii-web-urlruleinterface.html">UrlRuleInterface</a>
<a class="list-group-item" href="./yii-web-user.html">User</a>
<a class="list-group-item" href="./yii-web-userevent.html">UserEvent</a>
<a class="list-group-item" href="./yii-web-view.html">View</a>
<a class="list-group-item" href="./yii-web-viewaction.html">ViewAction</a>
<a class="list-group-item" href="./yii-web-xmlresponseformatter.html">XmlResponseFormatter</a>
<a class="list-group-item" href="./yii-web-yiiasset.html">YiiAsset</a></div>
<a class="list-group-item" href="#navigation-7068" data-toggle="collapse" data-parent="#navigation">yii\widgets <b class="caret"></b></a><div id="navigation-7068" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-widgets-activefield.html">ActiveField</a>
<a class="list-group-item" href="./yii-widgets-activeform.html">ActiveForm</a>
<a class="list-group-item" href="./yii-widgets-activeformasset.html">ActiveFormAsset</a>
<a class="list-group-item" href="./yii-widgets-baselistview.html">BaseListView</a>
<a class="list-group-item" href="./yii-widgets-block.html">Block</a>
<a class="list-group-item" href="./yii-widgets-breadcrumbs.html">Breadcrumbs</a>
<a class="list-group-item" href="./yii-widgets-contentdecorator.html">ContentDecorator</a>
<a class="list-group-item" href="./yii-widgets-detailview.html">DetailView</a>
<a class="list-group-item" href="./yii-widgets-fragmentcache.html">FragmentCache</a>
<a class="list-group-item" href="./yii-widgets-inputwidget.html">InputWidget</a>
<a class="list-group-item" href="./yii-widgets-linkpager.html">LinkPager</a>
<a class="list-group-item" href="./yii-widgets-linksorter.html">LinkSorter</a>
<a class="list-group-item" href="./yii-widgets-listview.html">ListView</a>
<a class="list-group-item" href="./yii-widgets-maskedinput.html">MaskedInput</a>
<a class="list-group-item" href="./yii-widgets-maskedinputasset.html">MaskedInputAsset</a>
<a class="list-group-item" href="./yii-widgets-menu.html">Menu</a>
<a class="list-group-item" href="./yii-widgets-pjax.html">Pjax</a>
<a class="list-group-item" href="./yii-widgets-pjaxasset.html">PjaxAsset</a>
<a class="list-group-item" href="./yii-widgets-spaceless.html">Spaceless</a></div></div>    </div>
    <div class="col-md-9 api-content" role="main">
        <h1>Class yii\helpers\BaseArrayHelper</h1>
<div class="top-nav">
    <a href="index.html">All Classes</a>
                | <a href="#methods">Methods</a>
            </div>

<table class="summaryTable docClass table table-bordered">
    <colgroup>
        <col class="col-name" />
        <col class="col-value" />
    </colgroup>
            <tr><th>Inheritance</th><td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td></tr>
                            <tr><th>Subclasses</th><td><a href="yii-helpers-arrayhelper.html">yii\helpers\ArrayHelper</a></td></tr>
                        <tr><th>Available since version</th><td>2.0</td></tr>
                    <tr>
          <th>Source Code</th>
          <td><a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php">https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php</a></td>
        </tr>
    </table>

<div class="class-description">
    <p><strong>BaseArrayHelper provides concrete implementation for <a href="yii-helpers-arrayhelper.html">yii\helpers\ArrayHelper</a>.</strong></p>
    <p>Do not use BaseArrayHelper. Use <a href="yii-helpers-arrayhelper.html">yii\helpers\ArrayHelper</a> instead.</p>

    </div>

<a id="properties"></a>

<a id="methods"></a>

<div class="summary doc-method">
<h2>Public Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-method" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
        <tr id="filter()">
        <td><a href="yii-helpers-basearrayhelper.html#filter()-detail">filter()</a></td>
        <td>Filters array according to rules specified.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="getColumn()">
        <td><a href="yii-helpers-basearrayhelper.html#getColumn()-detail">getColumn()</a></td>
        <td>Returns the values of a specified column in an array.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="getValue()">
        <td><a href="yii-helpers-basearrayhelper.html#getValue()-detail">getValue()</a></td>
        <td>Retrieves the value of an array element or object property with the given key or property name.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="htmlDecode()">
        <td><a href="yii-helpers-basearrayhelper.html#htmlDecode()-detail">htmlDecode()</a></td>
        <td>Decodes HTML entities into the corresponding characters in an array of strings.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="htmlEncode()">
        <td><a href="yii-helpers-basearrayhelper.html#htmlEncode()-detail">htmlEncode()</a></td>
        <td>Encodes special characters in an array of strings into HTML entities.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="index()">
        <td><a href="yii-helpers-basearrayhelper.html#index()-detail">index()</a></td>
        <td>Indexes and/or groups the array according to a specified key.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="isAssociative()">
        <td><a href="yii-helpers-basearrayhelper.html#isAssociative()-detail">isAssociative()</a></td>
        <td>Returns a value indicating whether the given array is an associative array.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="isIn()">
        <td><a href="yii-helpers-basearrayhelper.html#isIn()-detail">isIn()</a></td>
        <td>Check whether an array or <a href="http://www.php.net/class.traversable">Traversable</a> contains an element.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="isIndexed()">
        <td><a href="yii-helpers-basearrayhelper.html#isIndexed()-detail">isIndexed()</a></td>
        <td>Returns a value indicating whether the given array is an indexed array.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="isSubset()">
        <td><a href="yii-helpers-basearrayhelper.html#isSubset()-detail">isSubset()</a></td>
        <td>Checks whether an array or <a href="http://www.php.net/class.traversable">Traversable</a> is a subset of another array or <a href="http://www.php.net/class.traversable">Traversable</a>.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="isTraversable()">
        <td><a href="yii-helpers-basearrayhelper.html#isTraversable()-detail">isTraversable()</a></td>
        <td>Checks whether a variable is an array or <a href="http://www.php.net/class.traversable">Traversable</a>.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="keyExists()">
        <td><a href="yii-helpers-basearrayhelper.html#keyExists()-detail">keyExists()</a></td>
        <td>Checks if the given array contains the specified key.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="map()">
        <td><a href="yii-helpers-basearrayhelper.html#map()-detail">map()</a></td>
        <td>Builds a map (key-value pairs) from a multidimensional array or an array of objects.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="merge()">
        <td><a href="yii-helpers-basearrayhelper.html#merge()-detail">merge()</a></td>
        <td>Merges two or more arrays into one recursively.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="multisort()">
        <td><a href="yii-helpers-basearrayhelper.html#multisort()-detail">multisort()</a></td>
        <td>Sorts an array of objects or arrays (with the same structure) by one or several keys.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="remove()">
        <td><a href="yii-helpers-basearrayhelper.html#remove()-detail">remove()</a></td>
        <td>Removes an item from an array and returns the value. If the key does not exist in the array, the default value
will be returned instead.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
            <tr id="toArray()">
        <td><a href="yii-helpers-basearrayhelper.html#toArray()-detail">toArray()</a></td>
        <td>Converts an object or an array of objects into an array.</td>
        <td><a href="yii-helpers-basearrayhelper.html">yii\helpers\BaseArrayHelper</a></td>
    </tr>
    </table>
</div>

<a id="events"></a>

<a id="constants"></a>

<h2>Method Details</h2>

<div class="method-doc">

    <div class="detail-header h3" id="filter()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#filter()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L803" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L803" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        filter()
        <span class="detail-header-tag small">
            public                        static            method
                            (available since version 2.0.9)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Filters array according to rules specified.</strong></p>

        <p>For example:
<code>`</code>php
$array = [</p>
<pre><code class="hljs php"><span class="hljs-string">'A'</span> =&gt; [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>],
<span class="hljs-string">'B'</span> =&gt; [
    <span class="hljs-string">'C'</span> =&gt; <span class="hljs-number">1</span>,
    <span class="hljs-string">'D'</span> =&gt; <span class="hljs-number">2</span>,
],
<span class="hljs-string">'E'</span> =&gt; <span class="hljs-number">1</span>,
</code></pre>
<p>];</p>
<p>$result = \yii\helpers\ArrayHelper::filter($array, ['A']);
// $result will be:
// [
//     'A' => [1, 2],
// ]</p>
<p>$result = \yii\helpers\ArrayHelper::filter($array, ['A', 'B.C']);
// $result will be:
// [
//     'A' => [1, 2],
//     'B' => ['C' => 1],
// ]
<code>`</code></p>
<p>$result = \yii\helpers\ArrayHelper::filter($array, ['B', '!B.C']);
// $result will be:
// [
//     'B' => ['D' => 2],
// ]
<code>`</code></p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <strong><a href="yii-helpers-basearrayhelper.html#filter()-detail">filter</a></strong> ( <span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$filters</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Source array</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$filters</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Rules that define array keys which should be left or removed from results.
Each rule is:</p>
<ul>
<li><code>var</code> - <code>$array['var']</code> will be left in result.</li>
<li><code>var.key</code> = only `$array['var']['key'] will be left in result.</li>
<li><code>!var.key</code> = `$array['var']['key'] will be removed from result.</li>
</ul>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Filtered array</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="getColumn()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#getColumn()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L404" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L404" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getColumn()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Returns the values of a specified column in an array.</strong></p>

        <p>The input array should be multidimensional or an array of objects.</p>
<p>For example,</p>
<pre><code class="hljs php language-php"><span class="hljs-variable">$array</span> = [
    [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'123'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'abc'</span>],
    [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'345'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'def'</span>],
];
<span class="hljs-variable">$result</span> = ArrayHelper::getColumn(<span class="hljs-variable">$array</span>, <span class="hljs-string">'id'</span>);
<span class="hljs-comment">// the result is: ['123', '345']</span>

<span class="hljs-comment">// using anonymous function</span>
<span class="hljs-variable">$result</span> = ArrayHelper::getColumn(<span class="hljs-variable">$array</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(<span class="hljs-variable">$element</span>)</span> </span>{
    <span class="hljs-keyword">return</span> <span class="hljs-variable">$element</span>[<span class="hljs-string">'id'</span>];
});
</code></pre>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <strong><a href="yii-helpers-basearrayhelper.html#getColumn()-detail">getColumn</a></strong> ( <span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$name</span>, <span style="color: #0000BB">$keepKeys&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/class.closure">Closure</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$keepKeys</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether to maintain the array keys. If false, the resulting array
will be re-indexed with integers.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The list of column values</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="getValue()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#getValue()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L178" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L178" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getValue()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Retrieves the value of an array element or object property with the given key or property name.</strong></p>

        <p>If the key does not exist in the array or object, the default value will be returned instead.</p>
<p>The key may be specified in a dot format to retrieve the value of a sub-array or the property
of an embedded object. In particular, if the key is <code>x.y.z</code>, then the returned value would
be <code>$array['x']['y']['z']</code> or <code>$array-&gt;x-&gt;y-&gt;z</code> (if <code>$array</code> is an object). If <code>$array['x']</code>
or <code>$array-&gt;x</code> is neither an array nor an object, the default value will be returned.
Note that if the array already has an element <code>x.y.z</code>, then its value will be returned
instead of going through the sub-arrays. So it is better to be done specifying an array of key names
like <code>['x', 'y', 'z']</code>.</p>
<p>Below are some usage examples,</p>
<pre><code class="hljs php language-php"><span class="hljs-comment">// working with array</span>
<span class="hljs-variable">$username</span> = \yii\helpers\ArrayHelper::getValue(<span class="hljs-variable">$_POST</span>, <span class="hljs-string">'username'</span>);
<span class="hljs-comment">// working with object</span>
<span class="hljs-variable">$username</span> = \yii\helpers\ArrayHelper::getValue(<span class="hljs-variable">$user</span>, <span class="hljs-string">'username'</span>);
<span class="hljs-comment">// working with anonymous function</span>
<span class="hljs-variable">$fullName</span> = \yii\helpers\ArrayHelper::getValue(<span class="hljs-variable">$user</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(<span class="hljs-variable">$user</span>, <span class="hljs-variable">$defaultValue</span>)</span> </span>{
    <span class="hljs-keyword">return</span> <span class="hljs-variable">$user</span>-&gt;firstName . <span class="hljs-string">' '</span> . <span class="hljs-variable">$user</span>-&gt;lastName;
});
<span class="hljs-comment">// using dot format to retrieve the property of embedded object</span>
<span class="hljs-variable">$street</span> = \yii\helpers\ArrayHelper::getValue(<span class="hljs-variable">$users</span>, <span class="hljs-string">'address.street'</span>);
<span class="hljs-comment">// using an array of keys to retrieve the value</span>
<span class="hljs-variable">$value</span> = \yii\helpers\ArrayHelper::getValue(<span class="hljs-variable">$versions</span>, [<span class="hljs-string">'1.0'</span>, <span class="hljs-string">'date'</span>]);
</code></pre>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type">mixed</span> <strong><a href="yii-helpers-basearrayhelper.html#getValue()-detail">getValue</a></strong> ( <span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$key</span>, <span style="color: #0000BB">$default&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a>|<a href="http://www.php.net/language.types.object">object</a></td>
                  <td class="param-desc-col"><p>Array or object to extract value from</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$key</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/class.closure">Closure</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Key name of the array element, an array of keys or property name of the object,
or an anonymous function returning the value. The anonymous function signature should be:
<code>function($array, $defaultValue)</code>.
The possibility to pass an array of keys is available since version 2.0.4.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$default</span></td>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>The default value to be returned if the specified array key does not exist. Not used when
getting value from an object.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>The value of the element if found, default value otherwise</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidparamexception.html">yii\base\InvalidParamException</a></td>
                  <td class="param-desc-col"><p>if $array is neither an array nor an object.</p>
</td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="htmlDecode()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#htmlDecode()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L598" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L598" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        htmlDecode()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Decodes HTML entities into the corresponding characters in an array of strings.</strong></p>

        <p>Only array values will be decoded by default.
If a value is an array, this method will also decode it recursively.
Only string values will be decoded.</p>

        <p>See also <a href="http://www.php.net/manual/en/function.htmlspecialchars-decode.php">http://www.php.net/manual/en/function.htmlspecialchars-decode.php</a>.</p>    </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <strong><a href="yii-helpers-basearrayhelper.html#htmlDecode()-detail">htmlDecode</a></strong> ( <span style="color: #0000BB">$data</span>, <span style="color: #0000BB">$valuesOnly&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$data</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Data to be decoded</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$valuesOnly</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether to decode array values only. If false,
both the array keys and array values will be decoded.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The decoded data</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="htmlEncode()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#htmlEncode()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L565" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L565" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        htmlEncode()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Encodes special characters in an array of strings into HTML entities.</strong></p>

        <p>Only array values will be encoded by default.
If a value is an array, this method will also encode it recursively.
Only string values will be encoded.</p>

        <p>See also <a href="http://www.php.net/manual/en/function.htmlspecialchars.php">http://www.php.net/manual/en/function.htmlspecialchars.php</a>.</p>    </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <strong><a href="yii-helpers-basearrayhelper.html#htmlEncode()-detail">htmlEncode</a></strong> ( <span style="color: #0000BB">$data</span>, <span style="color: #0000BB">$valuesOnly&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span>, <span style="color: #0000BB">$charset&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$data</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Data to be encoded</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$valuesOnly</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether to encode array values only. If false,
both the array keys and array values will be encoded.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$charset</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The charset that the data is using. If not set,
<a href="yii-base-application.html#$charset-detail">yii\base\Application::$charset</a> will be used.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The encoded data</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="index()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#index()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L343" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L343" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        index()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Indexes and/or groups the array according to a specified key.</strong></p>

        <p>The input should be either multidimensional array or an array of objects.</p>
<p>The $key can be either a key name of the sub-array, a property name of object, or an anonymous
function that must return the value that will be used as a key.</p>
<p>$groups is an array of keys, that will be used to group the input array into one or more sub-arrays based
on keys specified.</p>
<p>If the <code>$key</code> is specified as <code>null</code> or a value of an element corresponding to the key is <code>null</code> in addition
to <code>$groups</code> not specified then the element is discarded.</p>
<p>For example:</p>
<pre><code class="hljs php language-php"><span class="hljs-variable">$array</span> = [
    [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'123'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'abc'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'laptop'</span>],
    [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'345'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'def'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'tablet'</span>],
    [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'345'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'hgi'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'smartphone'</span>],
];
<span class="hljs-variable">$result</span> = ArrayHelper::index(<span class="hljs-variable">$array</span>, <span class="hljs-string">'id'</span>);
</code></pre>
<p>The result will be an associative array, where the key is the value of <code>id</code> attribute</p>
<pre><code class="hljs php language-php">[
    <span class="hljs-string">'123'</span> =&gt; [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'123'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'abc'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'laptop'</span>],
    <span class="hljs-string">'345'</span> =&gt; [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'345'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'hgi'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'smartphone'</span>]
    <span class="hljs-comment">// The second element of an original array is overwritten by the last element because of the same id</span>
]
</code></pre>
<p>An anonymous function can be used in the grouping array as well.</p>
<pre><code class="hljs php language-php"><span class="hljs-variable">$result</span> = ArrayHelper::index(<span class="hljs-variable">$array</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(<span class="hljs-variable">$element</span>)</span> </span>{
    <span class="hljs-keyword">return</span> <span class="hljs-variable">$element</span>[<span class="hljs-string">'id'</span>];
});
</code></pre>
<p>Passing <code>id</code> as a third argument will group <code>$array</code> by <code>id</code>:</p>
<pre><code class="hljs php language-php"><span class="hljs-variable">$result</span> = ArrayHelper::index(<span class="hljs-variable">$array</span>, <span class="hljs-keyword">null</span>, <span class="hljs-string">'id'</span>);
</code></pre>
<p>The result will be a multidimensional array grouped by <code>id</code> on the first level, by <code>device</code> on the second level
and indexed by <code>data</code> on the third level:</p>
<pre><code class="hljs php language-php">[
    <span class="hljs-string">'123'</span> =&gt; [
        [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'123'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'abc'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'laptop'</span>]
    ],
    <span class="hljs-string">'345'</span> =&gt; [ <span class="hljs-comment">// all elements with this index are present in the result array</span>
        [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'345'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'def'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'tablet'</span>],
        [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'345'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'hgi'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'smartphone'</span>],
    ]
]
</code></pre>
<p>The anonymous function can be used in the array of grouping keys as well:</p>
<pre><code class="hljs php language-php"><span class="hljs-variable">$result</span> = ArrayHelper::index(<span class="hljs-variable">$array</span>, <span class="hljs-string">'data'</span>, [<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(<span class="hljs-variable">$element</span>)</span> </span>{
    <span class="hljs-keyword">return</span> <span class="hljs-variable">$element</span>[<span class="hljs-string">'id'</span>];
}, <span class="hljs-string">'device'</span>]);
</code></pre>
<p>The result will be a multidimensional array grouped by <code>id</code> on the first level, by the <code>device</code> on the second one
and indexed by the <code>data</code> on the third level:</p>
<pre><code class="hljs php language-php">[
    <span class="hljs-string">'123'</span> =&gt; [
        <span class="hljs-string">'laptop'</span> =&gt; [
            <span class="hljs-string">'abc'</span> =&gt; [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'123'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'abc'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'laptop'</span>]
        ]
    ],
    <span class="hljs-string">'345'</span> =&gt; [
        <span class="hljs-string">'tablet'</span> =&gt; [
            <span class="hljs-string">'def'</span> =&gt; [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'345'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'def'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'tablet'</span>]
        ],
        <span class="hljs-string">'smartphone'</span> =&gt; [
            <span class="hljs-string">'hgi'</span> =&gt; [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'345'</span>, <span class="hljs-string">'data'</span> =&gt; <span class="hljs-string">'hgi'</span>, <span class="hljs-string">'device'</span> =&gt; <span class="hljs-string">'smartphone'</span>]
        ]
    ]
]
</code></pre>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <strong><a href="yii-helpers-basearrayhelper.html#index()-detail">index</a></strong> ( <span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$key</span>, <span style="color: #0000BB">$groups&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The array that needs to be indexed or grouped</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$key</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/class.closure">Closure</a>|<a href="http://www.php.net/language.types.null">null</a></td>
                  <td class="param-desc-col"><p>The column name or anonymous function which result will be used to index the array</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$groups</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/language.types.string">string</a>[]|<a href="http://www.php.net/class.closure">Closure</a>[]|<a href="http://www.php.net/language.types.null">null</a></td>
                  <td class="param-desc-col"><p>The array of keys, that will be used to group the input array
by one or more keys. If the $key attribute or its value for the particular element is null and $groups is not
defined, the array element will be discarded. Otherwise, if $groups is specified, array element will be added
to the result array without any key. This parameter is available since version 2.0.8.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The indexed and/or grouped array</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="isAssociative()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#isAssociative()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L630" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L630" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        isAssociative()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Returns a value indicating whether the given array is an associative array.</strong></p>

        <p>An array is associative if all its keys are strings. If <code>$allStrings</code> is false,
then an array will be treated as associative if at least one of its keys is a string.</p>
<p>Note that an empty array will NOT be considered associative.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-helpers-basearrayhelper.html#isAssociative()-detail">isAssociative</a></strong> ( <span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$allStrings&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The array being checked</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$allStrings</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether the array keys must be all strings in order for
the array to be treated as associative.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether the array is associative</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="isIn()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#isIn()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L701" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L701" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        isIn()
        <span class="detail-header-tag small">
            public                        static            method
                            (available since version 2.0.7)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Check whether an array or <a href="http://www.php.net/class.traversable">Traversable</a> contains an element.</strong></p>

        <p>This method does the same as the PHP function <a href="http://php.net/manual/en/function.in-array.php">in_array()</a>
but additionally works for objects that implement the <a href="http://www.php.net/class.traversable">Traversable</a> interface.</p>

        <p>See also <a href="http://php.net/manual/en/function.in-array.php">http://php.net/manual/en/function.in-array.php</a>.</p>    </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-helpers-basearrayhelper.html#isIn()-detail">isIn</a></strong> ( <span style="color: #0000BB">$needle</span>, <span style="color: #0000BB">$haystack</span>, <span style="color: #0000BB">$strict&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$needle</span></td>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>The value to look for.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$haystack</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a>|<a href="http://www.php.net/class.traversable">Traversable</a></td>
                  <td class="param-desc-col"><p>The set of values to search.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$strict</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether to enable strict (<code>===</code>) comparison.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p><code>true</code> if <code>$needle</code> was found in <code>$haystack</code>, <code>false</code> otherwise.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidparamexception.html">yii\base\InvalidParamException</a></td>
                  <td class="param-desc-col"><p>if <code>$haystack</code> is neither traversable nor an array.</p>
</td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="isIndexed()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#isIndexed()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L666" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L666" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        isIndexed()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Returns a value indicating whether the given array is an indexed array.</strong></p>

        <p>An array is indexed if all its keys are integers. If <code>$consecutive</code> is true,
then the array keys must be a consecutive sequence starting from 0.</p>
<p>Note that an empty array will be considered indexed.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-helpers-basearrayhelper.html#isIndexed()-detail">isIndexed</a></strong> ( <span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$consecutive&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The array being checked</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$consecutive</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether the array keys must be a consecutive sequence
in order for the array to be treated as indexed.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether the array is associative</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="isSubset()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#isSubset()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L745" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L745" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        isSubset()
        <span class="detail-header-tag small">
            public                        static            method
                            (available since version 2.0.7)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Checks whether an array or <a href="http://www.php.net/class.traversable">Traversable</a> is a subset of another array or <a href="http://www.php.net/class.traversable">Traversable</a>.</strong></p>

        <p>This method will return <code>true</code>, if all elements of <code>$needles</code> are contained in
<code>$haystack</code>. If at least one element is missing, <code>false</code> will be returned.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-helpers-basearrayhelper.html#isSubset()-detail">isSubset</a></strong> ( <span style="color: #0000BB">$needles</span>, <span style="color: #0000BB">$haystack</span>, <span style="color: #0000BB">$strict&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$needles</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a>|<a href="http://www.php.net/class.traversable">Traversable</a></td>
                  <td class="param-desc-col"><p>The values that must <strong>all</strong> be in <code>$haystack</code>.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$haystack</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a>|<a href="http://www.php.net/class.traversable">Traversable</a></td>
                  <td class="param-desc-col"><p>The set of value to search.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$strict</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether to enable strict (<code>===</code>) comparison.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p><code>true</code> if <code>$needles</code> is a subset of <code>$haystack</code>, <code>false</code> otherwise.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidparamexception.html">yii\base\InvalidParamException</a></td>
                  <td class="param-desc-col"><p>if <code>$haystack</code> or <code>$needles</code> is neither traversable nor an array.</p>
</td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="isTraversable()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#isTraversable()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L728" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L728" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        isTraversable()
        <span class="detail-header-tag small">
            public                        static            method
                            (available since version 2.0.8)
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Checks whether a variable is an array or <a href="http://www.php.net/class.traversable">Traversable</a>.</strong></p>

        <p>This method does the same as the PHP function <a href="http://php.net/manual/en/function.is-array.php">is_array()</a>
but additionally works on objects that implement the <a href="http://www.php.net/class.traversable">Traversable</a> interface.</p>

        <p>See also <a href="http://php.net/manual/en/function.is_array.php">http://php.net/manual/en/function.is_array.php</a>.</p>    </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-helpers-basearrayhelper.html#isTraversable()-detail">isTraversable</a></strong> ( <span style="color: #0000BB">$var</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$var</span></td>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>The variable being evaluated.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether $var is array-like</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="keyExists()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#keyExists()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L486" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L486" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        keyExists()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Checks if the given array contains the specified key.</strong></p>

        <p>This method enhances the <code>array_key_exists()</code> function by supporting case-insensitive
key comparison.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.boolean">boolean</a></span> <strong><a href="yii-helpers-basearrayhelper.html#keyExists()-detail">keyExists</a></strong> ( <span style="color: #0000BB">$key</span>, <span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$caseSensitive&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$key</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The key to check</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The array with keys to check</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$caseSensitive</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether the key comparison should be case-sensitive</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether the array contains the specified key</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="map()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#map()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L461" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L461" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        map()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Builds a map (key-value pairs) from a multidimensional array or an array of objects.</strong></p>

        <p>The <code>$from</code> and <code>$to</code> parameters specify the key names or property names to set up the map.
Optionally, one can further group the map according to a grouping field <code>$group</code>.</p>
<p>For example,</p>
<pre><code class="hljs php language-php"><span class="hljs-variable">$array</span> = [
    [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'123'</span>, <span class="hljs-string">'name'</span> =&gt; <span class="hljs-string">'aaa'</span>, <span class="hljs-string">'class'</span> =&gt; <span class="hljs-string">'x'</span>],
    [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'124'</span>, <span class="hljs-string">'name'</span> =&gt; <span class="hljs-string">'bbb'</span>, <span class="hljs-string">'class'</span> =&gt; <span class="hljs-string">'x'</span>],
    [<span class="hljs-string">'id'</span> =&gt; <span class="hljs-string">'345'</span>, <span class="hljs-string">'name'</span> =&gt; <span class="hljs-string">'ccc'</span>, <span class="hljs-string">'class'</span> =&gt; <span class="hljs-string">'y'</span>],
];

<span class="hljs-variable">$result</span> = ArrayHelper::map(<span class="hljs-variable">$array</span>, <span class="hljs-string">'id'</span>, <span class="hljs-string">'name'</span>);
<span class="hljs-comment">// the result is:</span>
<span class="hljs-comment">// [</span>
<span class="hljs-comment">//     '123' =&gt; 'aaa',</span>
<span class="hljs-comment">//     '124' =&gt; 'bbb',</span>
<span class="hljs-comment">//     '345' =&gt; 'ccc',</span>
<span class="hljs-comment">// ]</span>

<span class="hljs-variable">$result</span> = ArrayHelper::map(<span class="hljs-variable">$array</span>, <span class="hljs-string">'id'</span>, <span class="hljs-string">'name'</span>, <span class="hljs-string">'class'</span>);
<span class="hljs-comment">// the result is:</span>
<span class="hljs-comment">// [</span>
<span class="hljs-comment">//     'x' =&gt; [</span>
<span class="hljs-comment">//         '123' =&gt; 'aaa',</span>
<span class="hljs-comment">//         '124' =&gt; 'bbb',</span>
<span class="hljs-comment">//     ],</span>
<span class="hljs-comment">//     'y' =&gt; [</span>
<span class="hljs-comment">//         '345' =&gt; 'ccc',</span>
<span class="hljs-comment">//     ],</span>
<span class="hljs-comment">// ]</span>
</code></pre>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <strong><a href="yii-helpers-basearrayhelper.html#map()-detail">map</a></strong> ( <span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$from</span>, <span style="color: #0000BB">$to</span>, <span style="color: #0000BB">$group&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$from</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/class.closure">Closure</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$to</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/class.closure">Closure</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$group</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/class.closure">Closure</a></td>
                  <td class="param-desc-col"></td>
                </tr>
                                                </table>

<!--	-->

    <div class="detail-header h3" id="merge()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#merge()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L115" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L115" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        merge()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Merges two or more arrays into one recursively.</strong></p>

        <p>If each array has an element with the same string key value, the latter
will overwrite the former (different from array_merge_recursive).
Recursive merging will be conducted if both arrays have an element of array
type and are having the same key.
For integer-keyed elements, the elements from the latter array will
be appended to the former array.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <strong><a href="yii-helpers-basearrayhelper.html#merge()-detail">merge</a></strong> ( <span style="color: #0000BB">$a</span>, <span style="color: #0000BB">$b</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$a</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Array to be merged to</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$b</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>Array to be merged from. You can specify additional
arrays via third argument, fourth argument etc.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The merged array (the original arrays are not changed.)</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="multisort()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#multisort()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L517" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L517" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        multisort()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Sorts an array of objects or arrays (with the same structure) by one or several keys.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type">void</span> <strong><a href="yii-helpers-basearrayhelper.html#multisort()-detail">multisort</a></strong> ( <b>&</b><span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$key</span>, <span style="color: #0000BB">$direction&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">SORT_ASC</span>, <span style="color: #0000BB">$sortFlag&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">SORT_REGULAR</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The array to be sorted. The array will be modified after calling this method.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$key</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a>|<a href="http://www.php.net/class.closure">Closure</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The key(s) to be sorted by. This refers to a key name of the sub-array
elements, a property name of the objects, or an anonymous function returning the values for comparison
purpose. The anonymous function signature should be: <code>function($item)</code>.
To sort by multiple keys, provide an array of keys here.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$direction</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.integer">integer</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The sorting direction. It can be either <code>SORT_ASC</code> or <code>SORT_DESC</code>.
When sorting by multiple keys with different sorting directions, use an array of sorting directions.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$sortFlag</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.integer">integer</a>|<a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The PHP sort flag. Valid values include
<code>SORT_REGULAR</code>, <code>SORT_NUMERIC</code>, <code>SORT_STRING</code>, <code>SORT_LOCALE_STRING</code>, <code>SORT_NATURAL</code> and <code>SORT_FLAG_CASE</code>.
Please refer to <a href="http://php.net/manual/en/function.sort.php">PHP manual</a>
for more details. When sorting by multiple keys with different sort flags, use an array of sort flags.</p>
</td>
                </tr>
                                                    <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-invalidparamexception.html">yii\base\InvalidParamException</a></td>
                  <td class="param-desc-col"><p>if the $direction or $sortFlag parameters do not have
correct number of elements as that of $key.</p>
</td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="remove()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#remove()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L231" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L231" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        remove()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Removes an item from an array and returns the value. If the key does not exist in the array, the default value
will be returned instead.</strong></p>

        <p>Usage examples,</p>
<pre><code class="hljs php language-php"><span class="hljs-comment">// $array = ['type' =&gt; 'A', 'options' =&gt; [1, 2]];</span>
<span class="hljs-comment">// working with array</span>
<span class="hljs-variable">$type</span> = \yii\helpers\ArrayHelper::remove(<span class="hljs-variable">$array</span>, <span class="hljs-string">'type'</span>);
<span class="hljs-comment">// $array content</span>
<span class="hljs-comment">// $array = ['options' =&gt; [1, 2]];</span>
</code></pre>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type">mixed|<a href="http://www.php.net/language.types.null">null</a></span> <strong><a href="yii-helpers-basearrayhelper.html#remove()-detail">remove</a></strong> ( <b>&</b><span style="color: #0000BB">$array</span>, <span style="color: #0000BB">$key</span>, <span style="color: #0000BB">$default&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$array</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The array to extract value from</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$key</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Key name of the array element</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$default</span></td>
                  <td class="param-type-col">mixed</td>
                  <td class="param-desc-col"><p>The default value to be returned if the specified key does not exist</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col">mixed|<a href="http://www.php.net/language.types.null">null</a></td>
                  <td class="param-desc-col"><p>The value of the element if found, default value otherwise</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="toArray()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-helpers-basearrayhelper.html#toArray()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2/edit/master/framework/helpers/BaseArrayHelper.php#L59" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2/blob/master/framework/helpers/BaseArrayHelper.php#L59" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        toArray()
        <span class="detail-header-tag small">
            public                        static            method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Converts an object or an array of objects into an array.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public static</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <strong><a href="yii-helpers-basearrayhelper.html#toArray()-detail">toArray</a></strong> ( <span style="color: #0000BB">$object</span>, <span style="color: #0000BB">$properties&nbsp;</span><span style="color: #007700">=&nbsp;[]</span>, <span style="color: #0000BB">$recursive&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$object</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.object">object</a>|<a href="http://www.php.net/language.types.array">array</a>|<a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The object to be converted into an array</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$properties</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>A mapping from object class names to the properties that need to put into the resulting arrays.
The properties specified for each class is an array of the following format:</p>
<pre><code class="hljs php language-php">[
    <span class="hljs-string">'app\models\Post'</span> =&gt; [
        <span class="hljs-string">'id'</span>,
        <span class="hljs-string">'title'</span>,
        <span class="hljs-comment">// the key name in array result =&gt; property name</span>
        <span class="hljs-string">'createTime'</span> =&gt; <span class="hljs-string">'created_at'</span>,
        <span class="hljs-comment">// the key name in array result =&gt; anonymous function</span>
        <span class="hljs-string">'length'</span> =&gt; <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(<span class="hljs-variable">$post</span>)</span> </span>{
            <span class="hljs-keyword">return</span> strlen(<span class="hljs-variable">$post</span>-&gt;content);
        },
    ],
]
</code></pre>
<p>The result of <code>ArrayHelper::toArray($post, $properties)</code> could be like the following:</p>
<pre><code class="hljs php language-php">[
    <span class="hljs-string">'id'</span> =&gt; <span class="hljs-number">123</span>,
    <span class="hljs-string">'title'</span> =&gt; <span class="hljs-string">'test'</span>,
    <span class="hljs-string">'createTime'</span> =&gt; <span class="hljs-string">'2013-01-01 12:00AM'</span>,
    <span class="hljs-string">'length'</span> =&gt; <span class="hljs-number">301</span>,
]
</code></pre>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$recursive</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether to recursively converts properties which are objects into arrays.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The array representation of the object</p>
</td>
                </tr>
                                    </table>

<!--	-->
</div>
        </div>
</div>

<script type="text/javascript">
    /*<![CDATA[*/
    $("a.toggle").on('click', function () {
        var $this = $(this);
        if ($this.hasClass('properties-hidden')) {
            $this.text($this.text().replace(/Show/,'Hide'));
            $this.parents(".summary").find(".inherited").show();
            $this.removeClass('properties-hidden');
        } else {
            $this.text($this.text().replace(/Hide/,'Show'));
            $this.parents(".summary").find(".inherited").hide();
            $this.addClass('properties-hidden');
        }

        return false;
    });
    /*
     $(".sourceCode a.show").toggle(function () {
     $(this).text($(this).text().replace(/show/,'hide'));
     $(this).parents(".sourceCode").find("div.code").show();
     },function () {
     $(this).text($(this).text().replace(/hide/,'show'));
     $(this).parents(".sourceCode").find("div.code").hide();
     });
     $("a.sourceLink").click(function () {
     $(this).attr('target','_blank');
     });
     */
    /*]]>*/
</script>


</div>

<footer class="footer">
        <p class="pull-right"><small>Page generated on Sat, 09 Jul 2016 12:15:45 +0000</small></p>
    Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a></footer>

<script type="text/javascript">jQuery(document).ready(function () {
    var shiftWindow = function () { scrollBy(0, -50) };
    if (location.hash) setTimeout(shiftWindow, 1);
    window.addEventListener("hashchange", shiftWindow);
var element = document.createElement("script");
element.src = "./jssearch.index.js";
document.body.appendChild(element);

var searchBox = $('#searchbox');

// search when typing in search field
searchBox.on("keyup", function(event) {
    var query = $(this).val();

    if (query == '' || event.which == 27) {
        $('#search-resultbox').hide();
        return;
    } else if (event.which == 13) {
        var selectedLink = $('#search-resultbox a.selected');
        if (selectedLink.length != 0) {
            document.location = selectedLink.attr('href');
            return;
        }
    } else if (event.which == 38 || event.which == 40) {
        $('#search-resultbox').show();

        var selected = $('#search-resultbox a.selected');
        if (selected.length == 0) {
            $('#search-results').find('a').first().addClass('selected');
        } else {
            var next;
            if (event.which == 40) {
                next = selected.parent().next().find('a').first();
            } else {
                next = selected.parent().prev().find('a').first();
            }
            if (next.length != 0) {
                var resultbox = $('#search-results');
                var position = next.position();

//              TODO scrolling is buggy and jumps around
//                resultbox.scrollTop(Math.floor(position.top));
//                console.log(position.top);

                selected.removeClass('selected');
                next.addClass('selected');
            }
        }

        return;
    }
    $('#search-resultbox').show();
    $('#search-results').html('<li><span class="no-results">No results</span></li>');

    var result = jssearch.search(query);

    if (result.length > 0) {
        var i = 0;
        var resHtml = '';

        for (var key in result) {
            if (i++ > 20) {
                break;
            }
            resHtml = resHtml +
            '<li><a href="' + result[key].file.u.substr(3) +'"><span class="title">' + result[key].file.t + '</span>' +
            '<span class="description">' + result[key].file.d + '</span></a></li>';
        }
        $('#search-results').html(resHtml);
    }
});

// hide the search results on ESC
$(document).on("keyup", function(event) { if (event.which == 27) { $('#search-resultbox').hide(); } });
// hide search results on click to document
$(document).bind('click', function (e) { $('#search-resultbox').hide(); });
// except the following:
searchBox.bind('click', function(e) { e.stopPropagation(); });
$('#search-resultbox').bind('click', function(e) { e.stopPropagation(); });

});</script></body>
</html>
